#!/usr/bin/env node

const mysql = require('mysql2/promise');

let con = mysql.createPool({
  host:'localhost',
  user:'root',
  password:'ddd',
  database:'test'
});


async function getAreas(){

  const sql = 'select * from areas';

  let [rows] = await con.execute(sql);
  return rows;
}

(async function(){
 console.log(await getAreas());
})();
